Evaluation of ionic liquids based imidazolium salts as an environmentally friendly corrosion inhibitors for carbon steel in HCl solutions

The features of this work on corrosion inhibition have been investigated based on the ecological awareness and according to the strict environmental legislations. This was done by studying how different imidazolium derivatives ionic liquids containing different alkyl chains R8, R10 and R12 affected the corrosion reaction of carbon steel specimen immersed in 1 M hydrochloric acid at various temperatures. Weight loss, potentiodynamic polarization and electrochemical impedance spectroscopy were utilized to examine the corrosion inhibition behavior on carbon steel. In addition, FT-IR spectroscopy was used to analyze the coated film that has been formed on the metal surface. The prepared ionic liquids showed effective inhibition efficiency, where the corrosion rate after the using of 100 ppm of R8-IL, R10-IL and R12-IL was decreased from 5.95 (µg cm−2 min−1) to 0.66, 0.56, and 0.44 (µg cm−2 min−1), respectively at 20 °C. In the polarization curves, the corrosion current, Icorr, decreases by ILs addition and suggest that ILs act as mixed type inhibitors. From EIS findings, the increase in Rct and decrease in Cdl values proves the adherence of inhibitor molecules on carbon steel surface. The temperature effect was also studied on the film formed, where increasing the temperature from 20 to 50 °C, the corrosion rate increased and the inhibitors efficacy decreased. The increasing in the length of the attached alkyl chain, the efficacies of the prepared inhibitors increases. Various thermodynamic parameters such as the reaction activation free energy (ΔG*), the entropy of activation (ΔS*), and the enthalpy of activation (ΔH*), as well as the adsorption isotherm were investigated in order to interpret the mechanism and obtain the most accurate perception.

For the severe environmental restrictions, the utilization of green corrosion inhibitors is highly eligible.The production of safe and ecofriendly corrosion inhibitors is being pursued.Therefore, ionic liquids (ILs) have emerged as essential eco-friendly and cost-effective inhibitors that have garnered significant interest from both the academic researchers and the engineers [19][20][21] .The leverage of ionic liquids in many applications including corrosion inhibitors is mostly related to their physical-chemical properties such as high solubility, non-toxicity, low volatility, non-flammable, synthesis without solvents with a high yield, no-electronic conductivity, high thermal stability [22][23][24] .Therefore, it was worthy to discuss additional significant properties that have been linked to corrosion inhibitors that are environmentally benign and safe in different media.In addition, the chemical structure such as the alkyl chain length that may have a positive performance on the inhibition of corrosion process 21,25 ; also, the formulated with π-electrons of double bonds as in benzene ring, and the lone pair of electrons on heteroatoms such as N, are well known as acid inhibitors.The presence of centers with high electron densities that permit the adsorption of the inhibitor molecules over the surface of metal and prevent them from any corrosive surroundings 21,26 .The chosen types of ILs in this study contains various active sites to form the most promising subclass depending on counter ions and nitrogen atoms which control their properties such as melting point, conductivity, solubility and viscosity 27 .Imidazolium ILs as heterocyclic nuclei containing nitrogen in their structures are diverse class of ILs which were recently included and attracted the attention because of their ability to create cationic molten salts.Moreover, imdazolieum based ILs were recorded as ecofriendly sustainable compounds in different industrial applications regarding to many properties such as biodegradability, non-toxicity, cost effectiveness, safety and their high solubility in water 28,29 .Gobara et.al, studied the application of some ILs as green inhibitors for the corrosion of carbon steel in acidic medium 19 , and the obtained results represented excellent efficiency of poly IL based acrylates.Also ILs based on fatty acids was studied in produced oilfield water by Atef et al. to investigate the effect of the fatty acid chain length 21 .It was found that the prepared DEA-C n ILs was efficient as green inhibitors for the corrosion of carbon steel; moreover, their efficacy increase by increasing the chain length of the fatty acids.In this study, we mainly aimed to study the electrochemical tests, weight loss measurements and metal surface studies to examine the effect of 3-(4-methylbenzyl)-1-octyl-1-Himidazolium chloride, 3-(4-methylbenzyl)-1-decyl-1-H-imidazolium chloride and 3-(4-methylbenzyl)-1-dodecyl-1-H-imidazolium chloride as inhibitors for the corrosion of carbon steel in 1 M hydrochloric acid.The performance of the synthesized ILs was determined through studying the effect of temperature, concentrations and the difference in their chemical structure as the alkyl chain length.

Experimental Materials
The experimental evaluation of the prepared ILs were carried out on carbon steel specimens that composed of Carbon = 0.12%, Manganese = 0.5%, Sulfur = 0.6%, Silicon = 0.17%, Phosphorus = 0.04%, and the remainder is Iron.

Solutions
Solutions of 1 M hydrochloric acid (37% analytical grade) containing various concentration of the prepared ILs of 20, 40, 60, 80, and 100 ppm were prepared using distilled water.

Weight loss method
Carbon steel sheets used in weight loss have the same exposed surface area of 32.67 cm 2 .A set of emery papers were used to abrade the carbon steel sheets, then were cleaned based on the standard method G1-03/ASTM 32 .The specimens were precisely weighed before being placed in a 600 ml glass bottles with 500 ml of a preset concentration of HCl for 30, 60, 90, 120 and 150 min at temperatures ranges of 20, 35 and 50 °C.Various doses of the ILs were added to the acidic solutions to investigate their effect on the corrosion rate.The prepared acidic solutions were exposed to the atmosphere.After that they were removed at specific periods, cleaned, dried, and precisely weighed.A triple of each experiment was performed.Three sheets of carbon steel were weighed and the average was taken.

Electrochemical measurements
A Potentiostat/Galvanostat (GAMRY 30000) connected to a computer with analysis software model (Gamry-Echem-Analyst) was used to output EIS and Tafel curves.Three electrodes; carbon steel, saturated calomel and platinum are as working electrode, reference electrode and auxiliary electrode, respectively in the glass cell.The working carbon steel electrode of surface area 0.345 cm 2 was prepared and introduced in 100 ml of 1 M HCl through 3 h in presence and absence of certain concentrations of the prepared series of ILs in order to constancy the electrochemical system in gravimetric method.The Tafel graphs were performed under scan rate equal to 1 mV/s in the potential range − 700 to − 200 mV/SCE.The Nyquist presentation in the EIS method was performed at frequencies ranging (0.1 Hz-100 kHz) with a corrosion potential and amplitude of 20 mV.

Analysis of protective film by FT-IR spectroscopy
The analytical Fourier transforms infrared (NICOLET iS50 FT-IR) instrument was the main used apparatus to determine the coated film composition stayed on the surface of the used metal through 24 h of immersion and R 10 -IL inhibitor.The collected powder which resulted after drying and scratching the specimen surface was analyzed.Vacuum dried R 10 -IL was used in ILs FT-IR experiment.The solid sample was mixed with spectroscopic grade KBr and introducing as KBr disk to the cell using an infrared lamp to be scanned.All of the tested samples spectra were obtained in the range of 4000 to 400 cm −1 under the rate of 32 cm −1 /min.

SEM and EDX surface analyses
The carbon steel surface was analyzed using the scanning electron microscopy (SEM) and the energy dispersive analysis of X-ray technique (EDX).For scanning electron microscopy studies, surface of carbon steel specimens was examined after exposure to 1 M HCl in the absence and presence of a certain concentration of the studied compound.SEM model (PHILIPS/FEI) was used to examine the surface morphology of steel surface.EDX model (PHILIPS/FEI) was employed to investigate the elements on the steel surface.All of the tests had been carried out in the chemical warfare department belonging to the Ministry of Defense.All micrographs of the carbon steel coupons were carried out at a magnification of 1000.

Concentrations of ILs and inhibitory effect
Weight loss-time curves of the carbon steel samples before and after the addition of R 8 -IL, R 10 -IL and R 12 -IL in 1 M HCl are shown in Fig. 2. The curves demonstrate that when the ILs concentrations in the acidic solution increase, the weight losses values (mg cm −2 ) of the carbon steel decrease, which enhances the inhibitor efficacy to impede corrosion.It is indicated that the formation of complex between ILs-donating species and carbon steel surface resulting the dissolution hindrance.The corrosion rate can be estimated using Eq.(1) 33 .
where ΔW represents the weight loss (mg), A is the area of the sample (cm 2 ), while t is the time (minutes).The inhibition efficiency; IE% of the utilized ILs on the carbon steel surface at different studied concentrations was determined related to the calculated rate of corrosion as shown in Eq. (2).
where W 1 and W 2 represent the weight loss of carbon steel without and with ILs as inhibitor, respectively.The inhibition efficiency data regarding the weight loss study in different concentrations of ILs in acidic medium (1 M HCl) are recorded in Table 1.The optimum dosage of the synthesized ILs was detected to determine the lowest rate of corrosion would be achieved at 100 ppm of all the ILs in 1 M HCl.

Temperatures and inhibitory effect
The corrosion rate of the synthesized ILs was examined at various temperature degrees to determine the created protected film stability.The effect of temperatures (35 and 50 °C) on the weight losses, and subsequently on the rate of corrosion of the carbon steel in the absence and presence of R 8 -IL, R 10 -IL and R 12 -IL, in the same concentration of acidic medium (1 M HCl) are shown in Fig. 3 (a, b, and c, respectively).Temperature significantly influences the rate that metal corrosion occurs.In an acidic solution, because the hydrogen evolution overpotential drops (hydrogen depolarization), the rate of corrosion increases exponentially with temperature 34 .From the investigation, the corrosion rate increases by increasing in temperature and the corrosion inhibition of the carbon steel surface eventually loses its efficacy.The data were calculated and presented in Table 1.www.nature.com/scientificreports/Thermodynamic calculations and kinetic activation were demonstrated to explore both the corrosion inhibition mechanism and the characteristics of the protective film in the acidic solution.The apparent activation energy (E a ) was calculated for R 8 -IL, R 10 -IL and R 12 -IL using Arrhenius equation (Eq.3), and plotted in Fig. 4. In the previous equation, C.R represents the rate of corrosion, A, R, and T are the pre-exponential frequency factor (Arrhenius's factor), universal gas constant, and absolute temperature, respectively.Table 2 includes activation energy (E a ) and the regulation factor (R 2 ) for the untreated and treated carbon steel samples with the prepared ILs in 1 M HCl solution.Ea can be clarified by the modified mechanism of corrosion process due to the presence of blocking ILs compounds 35 .It is obvious that its values of the inhibited carbon steel is higher than that of the un-inhibited one, implying that greater energy barrier is needed to exhibit the corrosion reactions.Kinetic activation parameters have been evaluated using Fig. 5 and Eq. ( 4): where N A is Avogadro's number and h is the Planck's constant, in addition to the entropy of activation (ΔS * ) that was determined from the plot intercept, and the enthalpy of activation (ΔH * ) that was determined from the plot slope.It is observed that ∆H * has positive values which means the endothermic activation process.It is also seen that ∆H * values increase by increasing the ILs concentrations in the same fashion as that for E a , indicating the role of the prepared ILs in increasing the formed energy barrier that diminishes the loss of the carbon steel in the acidic medium, allowing carbon steel to have a limited part in the corrosion process 36 .∆S * values were negative and increased with the increase of ILs concentration, i.e., the less negative values of ∆S * reveals that the activated complex is less ordered by ILs where the reaction occurs on going from reactant to the activated complex, and the activated complex in the rate-determining step is associative.This is the result of the adsorption of the prepared ILs on the carbon steel surface, which replaces the adsorbed water 37 , suggesting that ILs play an effective role against the corrosion process.The reactions activation free energy, ΔG * , can be estimated at 20 °C by using the following equation: By increasing the ILs concentration the free energy of activation increases, that attributed to the formation of unstable activated complex in the rate determining transition state.

Adsorption isotherms
The adsorption process of the inhibitor is defined as the displacement reaction where the adsorbed water molecule is replaced by the inhibitor molecule on the metal surface 38 .In acidic solutions, the adsorption behavior of the inhibitor causes the transition of the metal/solution interface that is responsible for forming a protective film, and hence, the reactive metal surface is shielded from the acid solutions 39 .It is known that the inhibitor chemical structure, the nature, distribution of charge overall the inhibitor molecule and charged surface of the metal specifies the type of adsorption on the metal surface and the adsorption process.The best fit to the experimental data obtained from weight loss measurements were adapted to Langmuir adsorption Isotherm 40 .The correlation coefficient R 2 of the Langmuir isotherm of the studied ILs was found to be in the range of 0.976-0.988and www.nature.com/scientificreports/ the slopes are close to 1, as shown in Fig. 6.Table 3 contains the calculated values of the equilibrium constant of adsorption/desorption process (K ads ) and the standard Gibbs free energy of adsorption (∆G°a ds ) according to Eqs. 6 and 7 41,42 .It is obvious that ∆G°a ds has negative values for the prepared ILs, which indicate the spontaneous adsorption of the ILs on the carbon steel surface 43 , and being between − 20 and − 40 kJ mol −1 shows an association of physisorption and chemisorption for the ILs on the carbon steel surface.In addition, the reported data revealed that increasing the alkyl chain length, increases the negative values of the negative free energy values.www.nature.com/scientificreports/where R is the universal gas cons.and T is temperature in Kelvin.

Potentiodynamic polarization
Tafel polarization data have been used to identify the kinetics and the electrochemical characteristics of the corrosion process.Figure 7 shows the relation between the current density (log I corr ) and the corrosion potential (E, mV) versus the reference electrode (SCE) for the carbon steel electrode immersed in the acidic solution of 1 M HCl without and with different concentrations of the prepared ILs.According to the polarization curves, adding ILs induces the anodic/cathodic polarization curves to shift towards a noble direction, which shows a reduction in the rate of corrosion of carbon steel 44 .Moreover, changing the corrosion potential suggests that the prepared ILs can be considered as mixed type inhibitors 45 .Table 4 contains the values of the estimated electrochemical parameters like I corr , E corr , βa, and βc.It is obvious that the current density is significantly reduced by increasing both inhibitor doses and the substituted alkyl chain length.The surface coverage, θ, has been calculated from [1 − (I corr /I o corr )] and the inhibition efficiency percentage, η T (%) by Tafel extrapolation are calculated according to Eq. ( 8) 46 .According to the mentioned parameters in Table 4, the R 12 -IL can be considered as the most efficient corrosion inhibitor.This could be attributed to the increase in substituted alkyl chain length, which in turn increase the surface area per molecule of each ionic liquid and grant it the ability to conceal the metal surface from the acidic medium.
where η T (%) is the inhibition efficiency percentage, I o corr is the current density without adding the inhibitor, and I corr is the current density after adding the inhibitor.
Additionally, the anticorrosive behavior of R 12 -IL was performed as a function of temperature at 35 °C and 50 °C and is shown in Fig. 8.The results showed that rising temperatures from 20 to 50 °C, significantly increase the corrosion current density and thus corrosion rate values.The influence of the temperature on η T (%) is shown in Table 5.It was cleared that the inhibition efficacy value reduced from 97.16 to 77.27% with the temperature increase from 20 to 50 °C.www.nature.com/scientificreports/

Electrochemical impedance (EIS)
According to EIS analyses, the Nyquist plots displayed a resistance spectra of the carbon steel samples in 1 M HCl in the presence of various concentration of the prepared ILs; R 8 -IL, R 10 -IL and R 12 -IL (Fig. 9a-c, respectively).The equivalent circuit consists of the charge transfer resistance (R ct ), the solution resistance (R s ) and the double layer capacitance (C dl ).It is shown that the resistance exhibited an expansion in size corresponding to variations in the amount of ionic liquids.By other words, the Nyquist plots exhibit a single depressed capacitive semicircle   in the blank solution and the impedance modulus show the maximum by adding the inhibitors referring that the inhibitor concentration has an effective role in corrosion reaction.The results showed that all of the investigated ILs inhibitors enhance the resistance of the charge transfer (R ct ) and decrease the capacitance (C dl ).From the experimental findings, R ct values increase until reaching its maximum effectiveness and C dl values decrease which proves the adherence of inhibitor molecules on the metal surface forming a barrier film which hinders the diffusion of corrosive species towards the metal surface and may also act as a physical barrier to protect the metal surface from further corrosion.The solution's resistance (R s ) remained consistently low regardless of the presence or absence of ionic liquids due to the high conductivity of all examined ionic liquids.It was noticed that the inclusion of ILs caused increasing of the overall resistance.Therefore, the presence of ILs in the HCl environment considerably positively altered the resistance responses of the carbon steel which explains the increase in the surface resistance by the increase of the ILs concentration.Based on the obtained results, the inhibition mechanism is controlled by charge transfer across the metal surface that has an inverse relation with the rate of corrosion 47 .Equation ( 9) is used to calculate η EIS (%) 48 .
where R ct0 is the charge transfer resistance without adding ILs and R ct is the charge transfer after adding ILs inhibitors.It is clear that η EIS (%) can be enhanced by increasing ILs concentration according to the data in Table 6.This increase is evidence that the adsorption of ILs on the metal surface can form a protective film and act as good inhibitors.The Bode plots of R 8 -IL, R 10 -IL and R 12 -IL are investigated and shown in (Fig. 10a-c, respectively).The results had shown that the presence of an adsorbed layer due to ILs inhibitor molecules increases the capacitive response of the interface, represents in the increased peak heights of the Bode curves.This was attributed to the formation of an electrochemical double layer with a capacitance which is consistent with the present findings.The electrochemical impedance confirmed the effectiveness of the prepared ILs as corrosion inhibitors for the carbon steel in acidic medium.Overall, elevating the concentrations of ionic liquids enhances the η EIS % value up to critical concentrations.The highest η EIS %, 98.33%, value was achieved with the ionic liquid, namely R 12 -IL, at 100 ppm. Figure 11 displays the best identical circuit for interpreting the EIS results.This circuit encompasses the components C dl (double-layer capacitor), R ct (charge transfer resistance), and Rs (solution resistance).The choice of this circuit could be attributed to provide the information needed for finding out the kinetic parameters and subsequently give more understanding about the reaction mechanism.Effect of temperatures was also studied for R 12 -IL at 35 °C and 50 °C as shown in Fig. 12a,b, respectively, and the data were tabulated in Table 7.At the same temperatures ranges, by increasing the concentration of the ILs, both of the solution resistance (R s ) and the charge transfer resistance (R ct ) were increased which in turn represent in increasing the inhibition efficacy, while the double layer capacitance C dl were decreased.This decline in the value of capacitance may be ascribed to the increased electrical double layer at the interface between the metal and the acidic solution and/or reduced local dielectric constant.Consequently, it may be assumed that the ionic liquid works as inhibitor by being adsorbed on the carbon steel.Moreover, the continued decline is brought by the steady replacement of the water molecules in the solution by the ionic liquid molecules, which lessens the degree of dissolving the carbon steel 49 .Based on the computed parameters, it was clear that the temperature affects negatively on the inhibition efficacy of the inhibitor.Simultaneously, in Bode plots at 35 °C and 50 °C, the phase angle increased with increasing concentration of the inhibitor until reaching its optimal level, Fig. 13a,b, respectively, as in R 12 -IL.All of these results suggest that the adsorbed inhibitor layer has a beneficial effect on the corrosion inhibition efficacy and are promising indicators of ILs effectiveness.

FT-IR spectra of film analysis
FT-IR analysis was performed for the protected film that has been found on the surface of the carbon steel samples after being immersed in the acidic medium containing 100 ppm of R 10 -IL inhibitor.The resultant spectrum was compared to the FT-IR spectrum of the R 10 -IL.The R 10 -IL constitutes of benzene unit, imidazole ring and www.nature.com/scientificreports/alkyl chain 30 .The FT-IR spectrum of vacuum dried R 10 -IL is shown in Fig. S1a.The broad band that appeared around 3410 cm −1 is attributed to the hydrogen bonded H 2 O molecules 50 .The appeared band at around 3130 cm −1 is assigned to the vibrational motion of the C-H aromatic, while the aliphatic ones of the attached alkyl chain appeared between 2925 and 2854 cm −151 .The vibration peaks of the C-C inside the imidazolium ring and the aromatic C=C can be seen around 1561-1517 cm −1 and 1465 cm −1 , respectively.Moreover, the stretching vibration motion of the C-N appeared at 1377 cm −1 .On the other hand, Fig. S1b shows the resulted FT-IR spectrum of the coating that developed on the exposed surfaces of the carbon steel samples to the acidic medium with R 10 -IL.It is obvious that there are some exceptions to most of the peaks that found in the protective film with than in the by R 10 -IL.The peaks at 3130, 2956, and 2925 cm −1 that assigned to the aromatic C-H in the imidazolium ring, methyl, and methylene groups respectively, disappeared in the coating film spectrum.Moreover, disappearing of the vibration peak assigned to the C-N represented at 1377 cm −1 , and the peaks around 1561 and 1517 cm −1 indicates the complication of iron with the IL or the formation of imidazole-iron salt.The appearance of a new peak at 462 cm −1 is attributed to the presence of γ-Fe 2 O 3 52 .It was reported that the ILs can donates electrons to the carbon steel to attain its noble state of orbit and increase its stability.This delays the redox reactions and prevents the carbon steel surface from being attacked by corrosion.

Surface analysis
SEM image of the carbon steel coupon immersed in 1 M HCl environment through 4 h is shown in Fig. 14a.It is obvious that the coupon surface was badly damaged in the uninhibited solution and exhibits a number of pits and cracks.The carbon steel immersed through 4 h in the inhibited solution (1 M HCl + 100 ppm R 12 -IL) as shown in Fig. 14b, was noticeably improved with fewer cracks and pits as compared with the carbon steel surface in the uninhibited solution.This enhancement is the result of forming a prohibitive film on the carbon steel surface.
Owing to the donating atoms that having unpaired electrons in addition to the way in which the π-electrons of double bonds inhibit carbon steel surface had excellent inhibitory efficacy.
The EDX spectrum of the uninhibited carbon steel coupon in Fig. 14a shows that it was severely weakened by external corrosion.By addition of 100 ppm of R 12 -IL inhibitor, the surface of the carbon steel was greatly improved due to formation of a protective film of the R 12 -IL molecules, as indicated by the decrease of iron band in Fig. 14b, showing that the protective film formed was strongly adherent to the surface, leading to a high degree of inhibition efficacy.

Fukui indices
The optimized structures, highest occupied molecular orbital (HOMO), lowest unoccupied molecular orbital (LUMO), and charge density of R 8 -IL, R 10 -IL, and R 12 -IL are presented in Figs. 15, 16 and 17, respectively.It is obvious that the electron density of the HOMO of the prepared ionic liquids is distributed over the chloride atom, while the LUMO is distributed close to the imidazole and the benzene rings.Fukui indices (f + and f-) of the prepared ionic liquids were calculated according to the electron charge distribution to determine the main electrophilic and nucleophilic sites on the ionic liquid molecules (Eqs.10 and 11).They are very important to measure the local reactivity of the molecules.
The f + measures the reactivity of the molecule regarding the nucleophilic attack, while the f − indicates the reactivity of the molecule towards the electrophilic attack.Fukui indices of R 8 -IL, R 10 -IL, and R 12 -IL are listed in Tables S1, S2, & S3.It is clear that the most reactive sites in the R 8 -IL, R 10 -IL, and R12-IL as nucleophiles are Cl (51), Cl (57), and Cl (63), respectively, while for electrophiles, the most reactive sites are H (22), H (24), and H (26), respectively.

Mechanism of inhibition
The inhibition mechanism of ILs may be explained as the adsorption of the ILs-donating species of ILs on the anodic sites of carbon steel, forming an adsorbed layer that restricts the surface from the solution and strengthen the protection of the metal surface.It was stated that imidazole-based IL has the ability to displace any adsorbed H 2 O molecules from the C-steel's surface as commercial inhibitors 53 .www.nature.com/scientificreports/At first, physisorption process takes place as a result of the charged cations on the metal surfaces can interact electrostatically with the anions of the ILs.This interaction is mainly triggered by either dipole/dipole interactions or London force.In addition, physisorption may occurs via the interaction of anion species on the metal surfaces and the cationic parts of the imidazolium ILs.The presence of Vanderwaals forces between the ILs containing long chains of methylene groups, increases the stability of the coated film at the surface of the carbon steel.It is assumed that, at cathodic sites on the metal surface, the bulky IL's cation can be adsorbed easily and replace the adsorbed H 2 O molecules (Fig. 18).Accordingly, the existence of inserted hetero-organic moieties, that provide more protection potential against the corrosion of steel, along with the entity of a long chain that increases the minimum area per molecule [54][55][56] .This interaction occurs through coordination bonds when ILs molecules adhere to create an restrictive layer at metal/solution interface.The presence of N=C-N moiety can easily provide active  sites to be adsorbed on the metal surface 57 .Moreover, the adsorption process can be increased in the presence of multiple bonds.
In addition, the suggested chemical adsorption that occurs through a mechanism involves the interaction of π-electrons on the nitrogen atom of the imidazolium ILs and also π-electrons of the aromatic moieties and the vacant d-orbital of the carbon steel 58 , preventing it from dissolving in the aggressive medium.
It was also assumed that adsorption can occur via the cation species of the ILs that oriented parallel to the metal surface.The delocalization of the nitrogen atom of the imidazolium cation inside the ring produces a mild positive charge on the whole cation of the IL.Then, the cation of the IL intends to accept electrons from the carbon steel surface.This process has the ability to alter the polarity of the carbon steel surface, due to the formation of multilayer of the adsorbed species (N + + Cl − /N − + N + ) on the surface 59 .On the other hand, the IL aromatic moieties donate the π electrons to the vacant d-orbitals in the surface of the carbon steel, which leads to the formation of donor-acceptor complexes 60,61 .The previous processes are responsible for an inter-electronic repulsion between the IL and the metal surface, which makes it easier for back bonding or retro-donation.Donation of electrons and back donation coupled strengthen one another, blocking the surface of the carbon steel, and subsequently preventing it from corrosion 62 , producing a stable chemical coating that reduces friction and wear reporting that imidazole-based IL are adsorbed on carbon steel surface by physical besides chemical adsorption process.

Comparison with the previous works
In comparison with others publications, numerous inhibitors that have been tested and applied industrially, those that are nontoxic or of low toxicity, are now far more strategic than in the recent past such as Schiff base derivatives 63,64 and ILs derivatives based as in this work.It was found that both of them are effective corrosion inhibitors which are attributed to their ability to spontaneously form a monolayer on the metal surface to be protected.Compared with other publications, research in the field of green or eco-friendly corrosion inhibitors has been addressed toward the goal of using cost effective compounds with low or zero environmental impact.
When comparing the examined ILs with other inhibitors of steel in acidic media that have been reported, the comparative analysis introduces an evident that the ILs that evaluated had higher efficiency and stronger protective performance.

Conclusions
The obtained results reveal that the investigated ILs have excellent performance in corrosion inhibition efficacy, η, at relatively economic doses in HCl acidic solution as eco-friendly inhibitors.From weight loss measurements, the inhibition efficacy of R 12 -IL was reached to be 92.5%, and 97.16% and 98.33% as measured by potentiodynamic polarization and electrochemical impedance spectroscopy, respectively and found to have the most effective inhibitor with optimum concentration 100 ppm at 293 K.The effect of temperature and immersion time were studied and thermodynamic parameters values of the interaction such as activation energy, enthalpy, entropy, and activation free energy were very satisfactory in the inhibition process.The inhibitive effect can be correlated to the adsorption of the ionic liquid species forming a protective film on the surface and that interpreted in the mode of adsorption that follows Langmuir isotherm and the parameters evaluation showed an association of physical and chemical adsorption.The polarization results suggested that the ionic liquids function act as a mixed inhibitor as shown from shifting in current profile.The corresponding results of EIS measurements was compared to the results from Tafel polarization measurements at all studied temperatures and represented as the increase in charge-transfer resistance (R ct ) and the decrease in double layer capacitance (C dl ) and showed good compatibility.
FI-TR analysis of the layer formed on carbon steel showed that the R 10 -IL donating species form the adhered protective layer by complication with iron ions of carbon steel, as a representative sample of other ILs.The findings demonstrate the potency of R 12 -IL which gave better inhibition performance than the other ILs, followed by R 10 -IL then R 8 -IL, respectively.The importance of this work Our work contribute to the field by the use of novel prepared ILs as carbon steel eco-friendly corrosion inhibitors in HCl solutions.The most important feature was the preparations of these ILs are environmentally safe, so, they have been extensively investigated recently and have more attention for the environmental restrictions.In addition, ILs based Imidazolium salts have several advantages including that exhibit high inhibition performance against the corrosion of carbon steel in HCl solution and the inhibition efficacy reached to more than 98% and that been reported by electrochemical measurements.The results were applied using various techniques; weight loss as a chemical method, potentiodynamic polarization and electrochemical impedance spectroscopy as electrochemical measurements, in addition of protective film analysis by FT-IR spectroscopy.
The use of these ILs are cost-effective compared to other corrosion inhibitors and can be facilely prepared in the laboratory.The imidazolium ILs are effective corrosion inhibitors that can be used in harsh conditions.These properties make them crucial aspect for sustainable development.
Overall, the new ILs based Imidazolium salts as corrosion inhibitors for carbon steel in HCl solution were introduced to the field many additions as their high inhibition efficacy, non-toxicity, cost-effectiveness, and environmental friendliness and a promising candidate for industrial applications.

Figure 3 .
Figure 3. Influence of temperatures (35 and 50 °C) with the addition of various concentrations of (a) R 8 -IL, (b) R 10 -IL and (c) R 12 -IL in 1 M HCl on the weight losses of the carbon steel samples.

Figure 4 .
Figure 4. Arrhenius plot for the immersed carbon steel in 1 M HCl without and with different concentrations of (a) R 8 -IL, (b) R 10 -IL and (c) R 12 -IL.

Figure 5 .
Figure 5. Transition state plot for the immersed carbon steel in 1 M HCl without and with different concentrations of (a) R 8 -IL, (b) R 10 -IL and (c) R 12 -IL.

Figure 7 .
Figure 7. Potentiodynamic polarization of carbon steel (immersed in 1 M HCl) at temperature of 20 °C after adding different concentrations of (a) R 8 -IL, (b) R 10 -IL, and (c) R 12 -IL.

Figure 8 .
Figure 8. Influence of temperatures on potentiodynamic polarization curves for carbon steel (immersed in 1 M HCl) before and after adding different concentrations of R 12 -IL.(a) at 35 °C and (b) at 50 °C.

Figure 9 .
Figure 9. Nyquist plots of carbon steel specimen (immersed in 1 M HCl) before and after using different concentrations of ILs at 20 °C; (a) R 8 -IL, (b) R 10 -IL and (c) R 12 -IL.

Figure 10 .
Figure 10.Bode plots for carbon steel specimen (immersed in 1 M HCl) before and after using different concentrations of ILs at 20 °C; (a) R 8 -IL, (b) R 10 -IL and (c) R 12 -IL.

Figure 11 .
Figure 11.Equivalent circuit selected for interpreting the EIS data.

Figure 12 .
Figure 12.Influence of temperatures on Nyquist curves for carbon steel immersed in 1 M HCl containing various concentrations of R 12 -IL; (a) at 35 °C and (b) at 50 °C.

Figure 13 .
Figure 13.Influence of temperatures on Bode curves for carbon steel immersed in 1 M HCl containing various concentrations of R 12 -IL; (a) at 35 °C and (b) at 50 °C.

Figure 14 .Figure 15 .Figure 16 .
Figure 14.SEM and EDX images for the carbon steel surface: (a) after immersion in 1 M HCl, and (b) after immersion in the presence of 100 ppm of R 12 -IL, at 20 °C.

Figure 18 .
Figure 18.The proposed reaction mechanism that inhibits the corrosion of the carbon steel using ILs.

Table 1 .
× 100 Effect of various concentrations of the prepared ILs on the weight loss of the carbon steel samples in acidic medium (1 M HCl) at various temperatures.

Table 2 .
Carbon steel activation parameters in 1 M HCl solution before and after using R 8 -IL, R 10 -IL and R 12 -IL inhibitors.

Table 3 .
Langmuir isotherm parameters for the studied ILs at 20 °C.

Table 4 .
Data from potentiodynamic polarization of carbon steel (immersed in 1 M HCl) in different concentrations of ILs.

Table 5 .
Data from polarization of carbon steel immersed in 1 M HCl before and after adding different concentrations of R 12 -IL at 35 and 50 °C.

Table 6 .
Data parameters of EIS for the carbon steel sample immersed in 1 M HCl using different concentrations of the ILs.

Table 7 .
Different parameters of EIS for the carbon steel in 1 M HCl with and without various concentrations of R 12 -IL at at 35 and 50 °C.